package com.lzh.persevere.controller;

import com.lzh.persevere.common.R;
import com.lzh.persevere.common.ResultUtil;
import com.lzh.persevere.model.qo.system.SystemInfoQO;
import com.lzh.persevere.service.SystemInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.Map;

/**
 * 系统信息controller
 *
 * @author luzhiheng
 * @since 2025-07-22
 */
@Api(tags = "系统信息")
@RestController
@RequestMapping("/systemInfo")
public class SystemInfoController {

    @Resource
    private SystemInfoService systemInfoService;

    @ApiOperation(value = "查询系统信息根据系统类别")
    @PostMapping("/findSystemValueByTypes")
    public R<Map<String, String>> findSystemValueByTypes(@Valid @RequestBody SystemInfoQO qo) {
        return ResultUtil.success(systemInfoService.findSystemValueByTypes(qo));
    }

}
